package calculator.operator;


import java.math.RoundingMode;

public class DivisionOperator implements Operator {

    public double doCal(double num1, double num2) {
        return fix(num2).divide(fix(num1),10, RoundingMode.HALF_UP).doubleValue();
    }


    public String toString() {
        return "÷";
    }

    public int getPriority() {
        return Priority.PRIORITY_LOW;
    }

    @Override
    public boolean support(char c) {
        return c == '÷';
    }
}
